package com.openfeign.sender.controller;

import com.openfeign.sender.feign.ReceiverFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author H
 * @date 2024/12/1
 */
@RestController
public class SenderController {

    @Autowired
    private ReceiverFeign receiverFeign;

    @GetMapping("test")
    public String test(@RequestParam String username, @RequestParam String address) {
        String receiver = receiverFeign.receiver(username, address);
        return receiver;
    }
}
